import request from '@/utils/request'

//云仓库存列表
export const getWarehouseList = (data:any, params?:any) => {
	return request({
	    url:'/mall/o/v1/warehouseList',
	    method:'post',
	    data:data,
		params:params
	})
}



//云仓库存列表
export const getCargoList = (data:any, params:any) => {
	return request({
	    url:'/storage/sjzl/cargoOverview',
	    method:'post',
	    data:data,
	    params:params,
		noLoading:data.noLoading,
	})
}


//获取库存
export const getStockList = (data:any, params:any) => {
	return request({
	    url:'/storage/zdspck/list',
	    method:'post',
	    data:data,
	    params:params,
	})
}

//仓储服务->普通货物操作->货物入仓->现场入仓->选择仓库
export function getWarehouse(data:any, params?:any) {
    return request({
        url: '/storage/zdspck/selectWarehouse1',
        method: 'post',
        data: data,
        params:params
    })
}

//货物出仓->现场出仓->选择客户->仓库
export const getWarehouse3 = (data: any) => {
    return request({
        url: '/storage/zdspck/selectWarehouse3',
        method: 'post',
        data: data
    })
}

//【仓储服务->数据总览->货物总览->仓库】/仓储服务->普通货物操作->货物入仓-仓库
export const getWarehouse15 = (data:any) => {
    return request({
        url: '/storage/zdspck/selectWarehouse15',
        method: 'post',
        data: data
    })
}

//仓储服务->货物出仓-仓库
export const getWarehouse23 = (data:any) => {
    return request({
        url: '/storage/zdspck/selectWarehouse23',
        method: 'post',
        data: data
    })
}


//仓储服务->普通货物操作->货物入仓->【现场入仓->选择仓位】/【详细->新增货物->增加行->选择仓位】
export const getWarehouseInSelectPosition = (data: any) => {
    return request({
        url: `/storage/category/selectPosition/${data.spckid}`,
        method: 'post',
        data: data
    })
}

//货物入仓列表
export const getWarehouseInList = (data:any,params:any) => {
  return request({
    url: `/storage/hwrc/list`,
    method: 'post',
    data: data,
    params:params,
	noLoading:data.noLoading,
  })
}

//货物入仓现场入仓添加
export const setWarehouseIn = (data:any) => {
  return request({
    url: `/storage/hwrc/add`,
    method: 'post',
    data: data,
  })
}

//货物入仓->详细
export const getWarehouseInDetailList = (data:any) => {
  return request({
    url: `/storage/hwrc/detail/${data.dzid}/${data.shztn}`,
    method: 'post',
    data: data
  })
}

//货物出仓#权限标识：zhcloud:hwcc:list
export const getWarehouseOutList = (data:any, params:any) => {
    return request({
        url: '/storage/hwcc/list',
        method: 'post',
        data: data,
        params:params,
		noLoading:data.noLoading,
    })
}

//货物出仓现场出仓添加
export const setWarehouseOut = (data:any) => {
    return request({
      url: `/storage/hwcc/add`,
      method: 'post',
      data: data,
    })
  }
  
//货物出仓->详细
export const getWarehouseOutDetailList = (data:any) => {
    return request({
      url: `/storage/hwcc/detail/${data.dzid}`,
      method: 'post',
      data: data
    })
}

//货物出仓->现场出仓->选择库存
export const getWarehouseOutStock1 = (data:any, params:any) => {
    return request({
        url: '/storage/hwcc/selectStock1',
        method: 'post',
        data: data,
        params:params,
		noLoading:data.noLoading,
    })
}

//锁仓线->刷新
export const getWarehouseOutRefresh = (data:any) => {
  return request({
      url: `/storage/hqzy/refresh/${data.khid}`,
      method: 'post',
      data: data
  })
}

//货物出仓->详细->客户
export const getCustomer = (data:any, params:any) => {
  return request({
      url: '/storage/hwcc/selectCustomer',
      method: 'post',
      data: data,
      params:params
  })
}


//仓储服务->普通货物操作->货物入仓->纱支、工艺、工序、用途、产地、漂染性
export const getYarnCount = (data: any) => {
    return request({
        url: `/storage/category/detailsDropDown1`,
        method: 'post',
        data: data
    })
}